From: Benjamin Otte Date: Wed, 1 Nov 2017 17:26:34 +0000 (+0100) Subject: gdk: Remove gdk_get_display_arg_name() X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~23^2~973 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=2d31a5499a5484e72dc30fe573d5934d8560361f;p=gtk4.git gdk: Remove gdk_get_display_arg_name() Since we're no longer allowing arguments, this is always NULL now. --- diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 745c790dda..a39abe6136 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -4,7 +4,6 @@
General general -gdk_get_display_arg_name gdk_notify_startup_complete gdk_notify_startup_complete_with_id gdk_set_allowed_backends diff --git a/gdk/gdk.c b/gdk/gdk.c index f26696c638..2f039c0490 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -241,27 +241,6 @@ gdk_pre_parse (void) } } -/** - * gdk_get_display_arg_name: - * - * Gets the display name specified in the command line arguments passed - * to gdk_init() or gdk_parse_args(), if any. - * - * Returns: (nullable): the display name, if specified explicitly, - * otherwise %NULL this string is owned by GTK+ and must not be - * modified or freed. - * - * Since: 2.2 - */ -const gchar * -gdk_get_display_arg_name (void) -{ - if (!_gdk_display_arg_name) - _gdk_display_arg_name = g_strdup (_gdk_display_name); - - return _gdk_display_arg_name; -} - /*< private > * gdk_display_open_default: * @@ -285,7 +264,7 @@ gdk_display_open_default (void) if (display) return display; - display = gdk_display_open (gdk_get_display_arg_name ()); + display = gdk_display_open (NULL); return display; } diff --git a/gdk/gdkglobals.c b/gdk/gdkglobals.c index ed3b15c279..d970a8d0e3 100644 --- a/gdk/gdkglobals.c +++ b/gdk/gdkglobals.c @@ -31,8 +31,6 @@ guint _gdk_debug_flags = 0; GList *_gdk_default_filters = NULL; -gchar *_gdk_display_name = NULL; -gchar *_gdk_display_arg_name = NULL; gboolean _gdk_disable_multidevice = FALSE; guint _gdk_gl_flags = 0; guint _gdk_vulkan_flags = 0; diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 06d1fa725e..f8393ee4b6 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -293,9 +293,7 @@ struct _GdkWindow #define GDK_WINDOW_TYPE(d) ((((GdkWindow *)(d)))->window_type) #define GDK_WINDOW_DESTROYED(d) (((GdkWindow *)(d))->destroyed) -extern gchar *_gdk_display_name; extern gint _gdk_screen_number; -extern gchar *_gdk_display_arg_name; extern gboolean _gdk_disable_multidevice; GdkEvent* _gdk_event_unqueue (GdkDisplay *display); diff --git a/gdk/gdkmain.h b/gdk/gdkmain.h index b1e9c13f13..82ce9a4555 100644 --- a/gdk/gdkmain.h +++ b/gdk/gdkmain.h @@ -61,10 +61,6 @@ GDK_AVAILABLE_IN_ALL void gdk_error_trap_pop_ignored (void); -GDK_AVAILABLE_IN_ALL -const gchar * gdk_get_display_arg_name (void); - - GDK_AVAILABLE_IN_ALL void gdk_set_double_click_time (guint msec); diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 19fd6fef35..e8a4c498c8 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -242,14 +242,14 @@ gdk_x_io_error (Display *display) "most likely the X server was shut down or you killed/destroyed\n" "the application.\n", g_get_prgname (), - display ? DisplayString (display) : gdk_get_display_arg_name ()); + display ? DisplayString (display) : NULL); } else { g_message ("%s: Fatal IO error %d (%s) on X server %s.\n", g_get_prgname (), errno, g_strerror (errno), - display ? DisplayString (display) : gdk_get_display_arg_name ()); + display ? DisplayString (display) : NULL); } _exit (1); diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index ae46512bd4..a626438a46 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -824,7 +824,7 @@ gtk_init (void) { if (!gtk_init_check ()) { - const char *display_name_arg = gdk_get_display_arg_name (); + const char *display_name_arg = NULL; if (display_name_arg == NULL) display_name_arg = getenv ("DISPLAY"); g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : "");